{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "47828a7a",
   "metadata": {},
   "source": [
    "## Using the You.com Retriever\n",
    "The retriever from You.com is good for retrieving lots of text. We return multiple of the best text snippets per URL we find to be relevant.\n",
    "\n",
    "First you just need to initialize the retriever"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a90d61d4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain.chains import RetrievalQA\n",
    "from langchain.llms import OpenAI\n",
    "from langchain.retrievers.you_retriever import YouRetriever\n",
    "\n",
    "yr = YouRetriever()\n",
    "qa = RetrievalQA.from_chain_type(llm=OpenAI(), chain_type=\"map_reduce\", retriever=yr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4a223f2f",
   "metadata": {},
   "outputs": [],
   "source": [
    "query = \"what starting ohio state quarterback most recently went their entire college career without beating Michigan?\"\n",
    "qa.run(query)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.17"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
